<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateWyReportOpLogTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('wy_report_op_log', function (Blueprint $table) {
            $table->increments('id');
            $table->integer('admin_id')->index('admin_id')->comment('管理员ID')->default(0);
            $table->tinyInteger('type')->comment('1操作 2登录');
            $table->dateTime('type_time')->comment('操作时间')->default('1000-01-01 00:00:00');
            $table->string('object', 255)->comment('操作对象')->default('');
            $table->string('content', 16000)->comment('备注')->default('');
            $table->softDeletes();
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('wy_report_op_log');
    }
}
